package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// AiQuestionsEntityToDto entity data transfer
func AiQuestionsEntityToDto(aiQuestions []*entity.AiQuestion) []*model.AiQuestionInfo {
	out := make([]*model.AiQuestionInfo, 0, len(aiQuestions))
	for _, c := range aiQuestions {
		out = append(out, AiQuestionEntityToDto(c))
	}
	return out
}

// AiQuestionEntityToDto entity data transfer
func AiQuestionEntityToDto(e *entity.AiQuestion) *model.AiQuestionInfo {
	return &model.AiQuestionInfo{

		Id: e.Id,

		Topic: e.Topic,

		Content: e.Content,

		Level: e.Level,

		Module: e.Module,

		Weight: e.Weight,

		ReferenceAnswer: e.ReferenceAnswer,
		GuideAnswer:     e.GuideAnswer,
		Background:      e.Background,
		Questioner:      e.Questioner,
		//QuestionerId:    e.QuestionerId,
		GuideWords: e.GuideWords,

		Issue:             e.Issue,
		ProductId:         e.ProductId,
		Heat:              e.Heat,
		RecommendStrength: e.RecommendStrength,
		Tag:               e.Tag,
		CourseType:        e.CourseType,
		CollectorId:       e.CollectorId,
		GoodsId:           e.CollectorId,
		Price:             e.Price,
		Stock:             e.Stock,
		Image:             e.Image,
		UpDown:            e.UpDown,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
